############################################################################
#
#		 Makefile for Interface	97 Service
#
#############################################################################
include $(CRM_SRC)/env/common.mk

INCLUDE	= -I. \
	  -I$(CRM_INCLUDE)/easy_xml \
	  -I$(CRM_INCLUDE)/database \
	  -I$(CRM_INCLUDE)/interface \
	  -I$(CRM_INCLUDE)/common \
	  -I$(CRM_INCLUDE)/ossxml \
	  -I$(CRM_INCLUDE)/pubfunction \
          -I$(CRM_INCLUDE)/ordercorba \
          -I$(CRM_INCLUDE)/sys_manager \
          -I$(CRM_INCLUDE)/sys_man_table \
	  -I$(CRM_INCLUDE)/log_manager \
	  -I$(CRM_INCLUDE)/log_man_table \
          -I$(CRM_INCLUDE)/custtable\
          -I$(CRM_INCLUDE)/customer\
          -I$(CRM_INCLUDE)/popedom_entity \
          -I$(CRM_INCLUDE)/popedom_table \
          -I$(CRM_INCLUDE)/domain \
          -I$(CRM_INCLUDE)/assign_table\
          -I$(CRM_INCLUDE)/assign\
          -I$(CRM_INCLUDE)/timelimit_table \
          -I$(CRM_INCLUDE)/timelimit \
	  -I$(CRM_INCLUDE)/bom \
	  -I$(CRM_INCLUDE)/bomtable \
	  -I$(CRM_INCLUDE)/caller_gen \
	  -I$(CRM_INCLUDE)/caller_gen_table \
	  -I$(CRM_INCLUDE)/flow \
	  -I$(CRM_INCLUDE)/flowtable \
	  -I$(CRM_INCLUDE)/ppm \
	  -I$(CRM_INCLUDE)/ppm_table \
          -I$(CRM_INCLUDE)/crm_server \
	  -I$(TUXDIR)/include 

BASELIB	= $(CRM_BIN)/ppm.a \
          $(CRM_BIN)/caller_ppm_task.a \
          $(CRM_BIN)/caller_ppm_procord.a \
	  $(CRM_BIN)/ppm.a \
	  $(CRM_BIN)/ppmtable.a \
          $(CRM_BIN)/flow.a \
          $(CRM_BIN)/flowtable.a \
          $(CRM_BIN)/pubfunction.a \
          $(CRM_BIN)/sys_manager.a \
          $(CRM_BIN)/table_sys_manager.a \
          $(CRM_BIN)/customer.a \
          $(CRM_BIN)/table_customer.a \
          $(CRM_BIN)/popedom_entity.a\
          $(CRM_BIN)/popedom_table.a\
          $(CRM_BIN)/timelimit.a\
          $(CRM_BIN)/timelimittable.a\
	  $(CRM_BIN)/log_manager.a \
          $(CRM_BIN)/table_log_manager.a \
          $(CRM_BIN)/assign.a\
          $(CRM_BIN)/assign_table.a\
          $(CRM_BIN)/bom.a \
          $(CRM_BIN)/bomtable.a \
          $(CRM_BIN)/callergen.a \
          $(CRM_BIN)/caller_gen_table.a \
          $(CRM_BIN)/xmlparser.a \
          $(CRM_BIN)/databaselib.a \
          $(CRM_BIN)/common.a \
          $(CRM_BIN)/crm_server.a \
          $(CRM_BIN)/easy_xml.a 

LIBS = $(BASELIB) $(LIB_COMMON)
BUILDSERVER = -D__BIGMSGQUEUE_ENABLED -D_REENTRANT -lpthread

CFLAGS = $(INCLUDE) $(INCLUDE_COMMON) $(CFLAGS_COMMON)
LDFLAGS = $(LDFLAGS_COMMON) $(LIBS)

all: ppm

PPM	= \
	ppm_c.cpp \
	ppm_s.cpp \
	ppm_i.cpp \
	ppms.cpp

ppm: $(PPM)
	buildobjserver -v -o  $@ -f "$(PPM)" -f "$(LDFLAGS) $(INCLUDE) $(INCLUDE_COMMON)"
	chmod 777 $@

rm :
	rm -f ppm

clean :
	rm -f *.o
	rm -f ppm

install:
	cp *.h* $(CRM_INCLUDE)/ppm/
	cp ppm $(CRMHOME)/boot/
